www.gusucode.com > 云枫工作室企业网站源码 1 > 云枫工作室企业网站源码 1.0/云枫工作室企业网站源码(asp无限制版)1.0/web/admin/Manage_abouts.asp
<!--#include file="conn.asp"--> <!--#include file="check.asp" --> <% select case request("action") case "" call main() case "dell" call dell() end select sub main() %> <% aid=request("aid") if aid=1 then titlelist="公司介绍" elseif aid=2 then titlelist="企业文化" elseif aid=3 then titlelist="联系我们" elseif aid=4 then titlelist="技术支持" end if Const PAGESIZE=20 Const PARTSIZE=3 dim pagecount,page,Spage,Epage,recordcount,i page = request.querystring("page") if page = "" or IsNull(page) then page = 1 if not IsNumeric(page) then page = 1 page = Cint(page) set rs = server.CreateObject ("Adodb.recordset") sql="select * from Tsm_about where aid="&aid&" order by id desc" rs.open sql,conn,1,1 recordcount = RS.RecordCount RS.PageSize = PAGESIZE pagecount = RS.PageCount if page < 1 then page = 1 elseif page > pagecount then page = pagecount end if %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title></title> <link href="css.css" rel="stylesheet" type="text/css"> </head> <body> <!--#include file="top.htm" --> <br> <table width="90%" border="0" align="center" cellpadding="5" cellspacing="0"> <tr> <td height="25" align="center" valign="middle" background="img/menu_manage.gif"><font color="#FFFFFF"><b><%=titlelist%>管理</b></font></td> </tr> </table> <table width="90%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#E3E3E3" class="text"> <tr bgcolor="#F6F6F6"> <td width="5%" height="25" bgcolor="#F6F6F6"><div align="center">ID</div></td> <td width="55%" bgcolor="#F6F6F6"><%=titlelist%>标题</td> <td width="10%" height="25"><div align="center">发 表 时 间</div></td> <td width="8%" align="center" valign="middle">修改</td> <td width="8%"><div align="center">删除</div></td> </tr> <%if RS.EOF then Response.Write("<tr><td colspan=5 bgcolor=#FFFFFF><center><font color=red>目前还没有内容!</font></td></tr>") else if recordcount > 0 then RS.AbsolutePage = page for i = 1 to PAGESIZE if RS.EOF then exit for %> <tr bgcolor="#FFFFFF" onMouseOver="this.bgColor='#F6F6F6'" onMouseOut="this.bgColor='FFFFFF'"> <td height="20" align="center"><%=Rs.recordcount-Rs.pagesize*(page-1)-i+1%></td> <td height="20"> <%= left(rs("title"),30) %></td> <td height="20" align="center" valign="middle"><%= rs("date1") %></td> <td align="center" valign="middle"><a href="Manage_about.asp?id=<%= rs("id")%>&aid=<%=aid%>"><img src="img/edit.gif" width="12" height="12" border="0"></a></td> <td height="20" align="center" valign="middle"><div align="center"><a href="?action=dell&id=<%= rs("id") %>&aid=<%=aid%>" onClick="javascript:return confirm('[ 操作提示 ]\n\n是否确认删除?删除数据将无法逆回!');"><img src="img/icon_del.gif" width="13" height="13" border="0"></a></div></td> </tr> <% RS.MoveNext() if RS.EOF then exit for next end if %> <tr align="center" valign="middle" bgcolor="#F7F7F7"> <td height="20" colspan="5"><!--#include file="page.asp"--></td> </tr> </table> </body> </html> <% end sub sub dell id = Request("id") sql="delete from Tsm_about where id=" & id conn.execute sql response.Redirect "Manage_abouts.asp?aid="&request("aid") %> <% end sub %>